home *** CD-ROM | disk | FTP | other *** search
/ Interactive Preview: Enemy of the State / Interactive Preview: Enemy of the State.iso / pc / alrtthis.dxr / 00099.ls < prev    next >
Encoding:
Text File  |  1998-11-18  |  1.8 KB  |  79 lines

  1. on enterFrame
  2. end
  3.  
  4. on exitFrame
  5.   go(the frame)
  6. end
  7.  
  8. on keyDown
  9.   case the key of
  10.     TAB:
  11.       doTabThang()
  12.     ENTER, RETURN:
  13.       doDefaultButton()
  14.   end case
  15. end
  16.  
  17. on doTabThang
  18.   global gDefaultButton
  19.   if the visible of sprite 9 = 1 then
  20.     if the visible of sprite 19 = 1 then
  21.       set the visible of sprite 9 to 0
  22.       set the visible of sprite 10 to 1
  23.       set the visible of sprite 11 to 0
  24.       set gDefaultButton to "2"
  25.       updateStage()
  26.       exit
  27.     else
  28.       if the visible of sprite 20 = 1 then
  29.         set the visible of sprite 9 to 0
  30.         set the visible of sprite 10 to 0
  31.         set the visible of sprite 11 to 1
  32.         set gDefaultButton to "3"
  33.         updateStage()
  34.         exit
  35.       end if
  36.     end if
  37.   else
  38.     if the visible of sprite 10 = 1 then
  39.       if the visible of sprite 20 = 1 then
  40.         set the visible of sprite 9 to 0
  41.         set the visible of sprite 10 to 0
  42.         set the visible of sprite 11 to 1
  43.         set gDefaultButton to "3"
  44.         updateStage()
  45.         exit
  46.       else
  47.         set the visible of sprite 9 to 1
  48.         set the visible of sprite 10 to 0
  49.         set the visible of sprite 11 to 0
  50.         set gDefaultButton to "1"
  51.         updateStage()
  52.         exit
  53.       end if
  54.     else
  55.       if the visible of sprite 11 = 1 then
  56.         set the visible of sprite 9 to 1
  57.         set the visible of sprite 10 to 0
  58.         set the visible of sprite 11 to 0
  59.         set gDefaultButton to "1"
  60.         updateStage()
  61.         exit
  62.       end if
  63.     end if
  64.   end if
  65. end
  66.  
  67. on doDefaultButton
  68.   global gDefaultButton
  69.   set msg to the text of field ("Msg" & gDefaultButton)
  70.   tell the stage
  71.     closeMe()
  72.   end tell
  73.   set btnName to the text of field ("Btn" & gDefaultButton && "PC")
  74.   tell the stage
  75.     do(msg)
  76.     return btnName
  77.   end tell
  78. end
  79.